package com.tuanzi.loan.business.service.settlementsystem.impl;

import com.tuanzi.loan.business.entity.settlementsystem.SettlementBillAnnex;
import com.tuanzi.loan.business.repository.settlementsystem.SettlementBillAnnexRepository;
import com.tuanzi.loan.business.service.settlementsystem.SettlementBillAnnexService;
import com.tuanzi.loan.core.aspect.Debug;
import com.tuanzi.loan.core.repository.JPAAuditRepository;
import com.tuanzi.loan.core.service.BaseAuditServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.retry.RetryException;
import org.springframework.retry.annotation.Retryable;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @author administrator
 * @create 2019-03-20 16:37
 */
@Debug
@Service
@Transactional
@Retryable(value = {RetryException.class})
public class SettlementBillAnnexServiceImpl extends BaseAuditServiceImpl<SettlementBillAnnex,Long> implements SettlementBillAnnexService {
    @Autowired
    private SettlementBillAnnexRepository settlementBillAnnexRepository;
    @Override
    protected JPAAuditRepository<SettlementBillAnnex, Long> getRepository() {
        return settlementBillAnnexRepository;
    }

    @Override
    public List<SettlementBillAnnex> findByBillId(Long billId) {
        return settlementBillAnnexRepository.findByBillId(billId);
    }
}
